int a;
int b;
int c;
int sum;
int max;
int i;
int j;

// Initialize variables
a = 10;
b = 5;
c = 3;
sum = 0;
max = 0;
i = 1;
j = 1;

// Nested if-else structure
if (a > b) {
    if (a > c) {
        max = a;
    } else {
        max = c;
    }
} else {
    if (b > c) {
        max = b;
    } else {
        max = c;
    }
}

// Complex while loop with nested logic
while (i <= a) {
    j = 1;
    while (j <= b) {
        if ((i + j) > max) {
            sum = sum + i * j;
        } else {
            sum = sum + i + j;
        }
        j = j + 1;
    }
    
    if (sum > 50) {
        sum = sum - 10;
    }
    
    i = i + 1;
}

// Complex arithmetic expressions
a = (max * 2 + sum) / (i + j - 1);
b = sum * (max - a) + (c * i);
c = (a + b + c) * (max - sum) / (i * j); 